home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / funeq.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  804 b   |  39 lines

  1. /*
  2. \funcref{fun\_eq}{void fun\_eq ()}
  3.     {}
  4.     {}
  5.     {push(), compare(), pop()}
  6.     {}
  7.     {funeq.c}
  8.     {
  9.  
  10.         Function {\em fun\_eq()} is called when opcode {\em op\_eq} is read.
  11.         This function pops two variables, calls {\em compare()} to compare the
  12.         values, and pushes the result of the comparison. The two compared
  13.         variables are discarded.
  14.  
  15.         The result of the comparison is logically {\em not}-ted when two
  16.         integers are beging compared, since {\em compare()} subtracts two
  17.         integer values as result.
  18.  
  19.     }
  20. */
  21.  
  22. #include "icm-exec.h"
  23.  
  24. void fun_eq ()
  25. {
  26.     VAR_
  27.         lval,
  28.         rval;
  29.  
  30.     rval = pop ();
  31.     lval = pop ();
  32.     compare (lval, rval);
  33.  
  34.     stack [sp].vu.intval = ! stack [sp].vu.intval;
  35.  
  36.     discard (lval);
  37.     discard (rval);
  38. }
  39.